<%@ page contentType="text/html; charset=utf-8" language="java"  errorPage="" %>
<%@ include file="page_init.jsp"%>

<!--顶侧栏-->
<script src="${ctx}/MAdmin/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
function chagePageLeft(authorityId){
	//左侧目录 -只遍历 子节点, 不遍历孙节点, 找到目录并隐藏
	$.each($("#side-menu").children("[name=catalog]"),function(){
		$(this).hide();
	});
	//左侧目录 - 遍历对应的并显示出来
	$.each($("#side-menu").find("[relyauthority=authority"+authorityId+"]"),function(n,auth){
	     $(auth).slideDown("slow");
	});
}
</script>


<div id="header-topbar-option-demo" class="page-header-topbar">
	<nav id="topbar" role="navigation" style="margin-bottom: 0; z-index: 2;" class="navbar navbar-default navbar-static-top">
		<div class="navbar-header">
            <a id="logo" class="navbar-brand">
            	<span class="logo-text">发布系统</span>
            </a>
		</div>

		<div class="topbar-main">
			<!-- 顶侧目录菜单 -->
			<ul class="nav navbar-nav horizontal-menu hidden-sm hidden-xs">
				<c:forEach	items="${USERAuthoritySysCatalogSysResourceList}" var="authority" >
					<li><a name="authority" href="javascript:chagePageLeft(${authority.id});"><i class="fa fa-sitemap fa-fw"></i>&nbsp;${authority.authorityname}</a></li>
				</c:forEach>
			</ul>
			<!-- 个人信息 -->
			<ul class="nav navbar navbar-top-links navbar-right mbn">
				<li class="dropdown topbar-user">
					<a data-hover="dropdown" href="#" class="dropdown-toggle">
						<!-- 头像图片 -->
						<!-- <img src="https://s3.amazonaws.com/uifaces/faces/twitter/kolage/48.jpg" alt="" class="img-responsive img-circle" /> -->
						&nbsp;
						<span class="hidden-xs">${SYS_USER_INFO.name}</span>
						&nbsp;
						<span class="caret"></span>
					</a>

					<ul class="dropdown-menu dropdown-user pull-right">
						<!-- 带数字标记参考 -->
						<!-- <li><a href="#"><i class="fa fa-tasks"></i>My Tasks<span class="badge badge-success">7</span></a></li> -->
	                    <li><a href="extra-profile.html"><i class="fa fa-user"></i>个人信息</a></li>
	                    <li><a href="page-calendar.html"><i class="fa fa-calendar"></i>修改密码</a></li>
	                    <li class="divider"></li>
	                    <li><a href="${ctx}/j_spring_security_logout"><i class="fa fa-key"></i>登出</a></li>
	                </ul>
	           	</li>
             </ul>
		</div>
	</nav>

</div>